Network node with layer 3 interfaces configurable by interface class

ABSTRACT

A concept of “Interface Class” is introduced. All logical interfaces that belong to an Interface Class are indistinguishable in hardware. Each Interface Class is associated with one or more packet forwarding rules, such as Access Control Lists (ACLs), Policy Routes, and Quality of Service (QoS). Each Interface Class is also assigned with a Class ID, which is a user-defined integer. When defined in terms of a Class ID, a logical interface (e.g., an L3 Interface) will inherit all the packet forwarding rules associated with the Class ID. In one embodiment, Class IDs and Interface IDs can be stored in the same hardware lookup table in association with data representative of their respective packet forwarding rules.

CROSS-REFERENCE TO RELATED APPLICATION

[0001] This application is entitled to the benefit of provisional U.S. Patent Application Serial No. 60/385,866, filed Jun. 4, 2002, which is incorporated herein by reference.

FIELD OF THE INVENTION

[0002] The invention relates generally to the field of networking and more specifically to a method and apparatus for configuring interfaces of a network node.

BACKGROUND OF THE INVENTION

[0003] In switch/routers, interface identifiers (interface IDs) are used for identifying Layer 3 (L3) Interfaces. In typical switch/routers, the maximum number of interface IDs that have hardware support is fixed due to hardware limitations. For instance, in some switch/routers, the interface IDs are limited to 12-bits in length. Therefore, in those switch/routers, there can only be 4096 unique interface IDs. That is, in those switch/routers, the maximum number of Layer 3 Interfaces that can be supported by hardware is 4096.

[0004] The number of L3 Interfaces that would benefit from hardware support may far exceed 4096. Yet, the number of interface IDs that the switch/router can store remains limited due to the high cost of memory, such as Content Addressable Memories (CAMs) that are used for storing such identifiers.

[0005] In view of the foregoing, there exists a need for a switch/router where the number of hardware-supported logical interfaces can exceed the number of available interface identifiers.

SUMMARY OF THE INVENTION

[0006] The invention introduces the concept of “Interface Class.” Interfaces that belong to an Interface Class are indistinguishable in hardware. Each Interface Class is associated with one or more packet forwarding rules that define network services, such as Access Control Lists (ACLs), Policy Routes, and Quality of Service (QoS). Each Interface Class is also assigned a Class ID, which is a user-defined integer. When defined using a Class ID, a logical interface (e.g., an L3 Interface) will inherit all of the packet forwarding rules associated with the Class ID. The packet forwarding rules of the Interface Class are applicable to the logical interface. In one embodiment, Class IDs and Interface IDs can be stored in the same hardware lookup table in association with data representative of their respective packet forwarding rules.

[0007] According to one embodiment, one or more interface classes are defined in terms of a Class ID and a set of packet forwarding rules. An interface can then be configured by associating the interface with an applicable Class ID as well as other interface-specific attributes, such as IP addresses. An interface can also be configured without a Class ID. In an embodiment, an interface that is configured without a Class ID belongs to a default class and will be assigned an Interface ID by the network node. In operation, when a packet arrives, a lookup is performed to determine the Class ID that is associated with the packet. Another lookup is then performed using the Class ID to retrieve packet forwarding rules that are pertinent to packet. The use of one lookup result in a subsequent lookup is often referred to as a “cascaded” lookup.

[0008] The use of interface classes enables the same set of packet forwarding rules to be associated with different interfaces while consuming only a single interface ID value from the limited ID space. Associating the same interface class with multiple interfaces has an aggregation effect that expands the number of interfaces that can be accommodated in a cascaded lookup. As a result, even if the number of Class IDs and Interface IDs is limited, the network node can support a significantly larger number of logical interfaces.

[0009] Other aspects and advantages of the present invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention.

BRIEF DESCRIPTION OF THE FIGURES

[0010]FIG. 1 depicts an example a network node in which embodiments of the invention can be implemented.

[0011]FIG. 2 depicts a number of interface configuration commands according to an embodiment of the invention.

[0012]FIG. 3 depicts a portion of an example hardware lookup table showing the relationship between Class ID and packet forwarding rules, in accordance with an embodiment of the invention.

[0013]FIG. 4 depicts a portion of a lookup table where VLAN IDs of the L3 Interfaces can be used as keys to look up the corresponding Class IDs and Interface IDs, in accordance with an embodiment of the invention.

[0014]FIG. 5 depicts a flow diagram for an L3 switching process performed by a packet forwarding mechanism according to an embodiment of the invention.

[0015]FIG. 6A depicts the limitation on the number of supported interfaces.

[0016]FIG. 6B depicts the aggregation effect brought about by the use of Interface Classes according to an embodiment of the invention.

[0017] Throughout the description, similar reference numbers may be used to identify similar elements.

DETAILED DESCRIPTION

[0018] Embodiments of the invention can be implemented within a network node that handles traffic in discrete units, often referred to as datagrams, data packets or packets. In one embodiment, the network node can be an Ethernet switch/router that forwards traffic using OSI (Open Systems Interconnect) Layer 2, Layer 3, and/or Layer 4 header information. The network node may have a distributed architecture. That is, the network node may include line cards that are coupled to each other via a switch matrix and each line card is partially responsible for processing and forwarding the datagrams. Furthermore, the network node supports network protocols such as Ethernet, ATM, and Frame Relay. Although embodiments of the invention can be implemented within an Ethernet-based switch/router with a distributed architecture, the invention can be implemented within network nodes with other types of architecture as well.

[0019]FIG. 1 depicts an example a network node 100 in which embodiments of the invention can be implemented. The example network node includes a primary control module 106, a secondary control module 108, a switch fabric 104, and three line cards 102A, 102B, and 102C (line cards A, B, and C). The network node handles traffic in discrete units, often referred to as datagrams. In an embodiment, the network node is an Ethernet switch/router that forwards traffic within the network node using Layer 2, Layer 3, and/or Layer 4 header information. The network node may include line cards that support network protocols such as Ethernet, ATM, and Frame Relay.

[0020] Each of the line cards includes at least one port 116, a processor 118, and memory 120, which perform functions such as receiving traffic into the network node, buffering traffic, storing instances of a routing table, making forwarding decisions, and transmitting traffic from the network node. The processor within each line card may include a multifunction processor and/or an application specific processor that is operationally connected to the memory. The processor performs functions such as packet parsing, packet classification, and making forwarding decisions. The memory within each line card may include circuits for storing operational code, for buffering traffic, for storing an instance of an FIB, and for storing other data structures. Operational code is typically stored in non-volatile memory such as electrically erasable programmable read-only memory (EEPROM) or flash ROM while traffic and data structures are typically stored in volatile memory such as random access memory (RAM). Example data structures that are stored in the RAM include configuration state information and traffic forwarding information (i.e., the FIB). Forwarding information may also be stored in content addressable memory (CAM) or a combination of CAM and RAM. Although the processor and memory are depicted as separate functional units, in some instances, the processor and memory are integrated onto the same device. In addition, there may be more than one discrete processor unit and more than one memory unit on the line cards.

[0021] The switch fabric 104 provides datapaths between input ports and output ports and may include, for example, shared memory, shared bus, and crosspoint matrices. Although not depicted, the network node 100 may be equipped with redundant switch fabrics.

[0022] The primary and secondary control modules 106 and 108 support various functions, such as network management functions and protocol implementation functions. Example network management functions that are performed by the control modules include providing an interface configuration mechanism, providing timing control, updating Forwarding Information Bases, programming hardware tables, providing system information, managing hardware changes, bus management, and protocol processing. The interface configuration mechanism, in one embodiment of the invention, is a Command Line Interface (CLI) that is operable to receive user commands.

[0023] Each of the control modules 106 and 108 includes a processor 122 and memory 124 for carrying out the designated functions. The processor within each control module may include a multifunction microprocessor and/or an application specific processor that is operationally connected to the memory. The memory may include EEPROM or flash ROM for storing operational code and DRAM for buffering traffic and storing data structures. Although the processor and memory are depicted as separate functional units, in some instances, the processor and memory are integrated onto the same device. In addition, there may be more than one discrete processor unit and more than one memory unit on the line cards.

[0024] A main function of the network node 100 is to relay datagrams, or packets, from one data link to another. To do that, the characteristics of the interfaces through which the packets are received and sent must be defined. Interface characteristics include, but are not limited to, IP address, a port identifier, data encapsulation method, and media type. These interface characteristics are typically configured during a system setup process or an interface configuration process.

[0025] “Interface” is a Layer 3 concept. In the present description, an “interface” can refer to a physical port or to a logical interface. Logical interfaces are sometimes called virtual interfaces or subinterfaces. A subinterface is a mechanism that allows a single physical interface to support multiple logical interfaces or networks. That is, several logical interfaces or networks can be associated with a single hardware interface. Configuring multiple logical interfaces on a single physical interface allows greater flexibility, scalability and connectivity of the network node.

[0026] Regardless of whether an interface is physical or logical, each interface of the network node 100 is typically configured with one or more IP addresses and IP subnet masks. In addition, many network services, such as Quality of Service guarantees (QoS), Access Control List (ACL), and Policy Routing, can be enabled on a “per-interface” basis. Network services that are enabled on a “per-interface” basis apply to individual interfaces.

[0027] The invention introduces the concept of “Interface Class.” According to an embodiment of the invention, an Interface Class refers to a group of interfaces that share certain attributes. All logical interfaces that belong to an Interface Class are indistinguishable in hardware and share the same network services. Network services, such as QoS, ACL, and Policy Routing, can be enabled on a “per-interface-class” basis. In contrast to network services that are enabled on a “per interface” basis, network services that are enabled on a “per-interface-class” basis can be applied to multiple interfaces that are associated with the same Interface Class. In other words, network services (or packet forwarding rules that define the network services) that are applicable to an Interface Class are applicable to all interfaces that are associated with or identified as belonging to that Interface Class.

[0028] Referring now to FIG. 2, there is shown a number of interface configuration commands according to an embodiment of the invention. In one embodiment, these interface configuration commands are input by a user/adminstrator through an interface configuration mechanism (e.g., Command Line Interface) of the network node. It should be understood that these interface configuration commands are shown as examples only and that the syntax of such commands shown may be implementation specific. In other implementations, the syntax of such commands may vary. Nonetheless, the principles of the invention can be equally applied.

[0029] The interface configuration commands of FIG. 2 include commands for configuring an Interface Class. In the illustrated examples, class configuration commands configure an Interface Class in terms of a Class ID and packet forwarding rules, which define network services such as ACL, QoS, and policy routing. One particular example of a class configuration command is command 202, which specifies a Class ID 52 and two packet forwarding rules (“ip access-group 102 out” and “ip policy route-map Houston-MCI”). The first rule “ip access-group 102 out” restricts packets that are associated with the access group “102”, which is defined by access-list configuration commands 214. The second rule “ip policy route-map Houston-MCI” is a Policy Routing rule.

[0030] When the network node receives the class configuration command 202, the network node will store the Class ID 52 in a hardware lookup table in association with data representative of the two aforementioned packet forwarding rules. A portion of an example hardware lookup table showing the relationship between Class ID and packet forwarding rules is shown in FIG. 3. In one embodiment, the hardware lookup table is implemented by a Content Addressable Memory (CAM).

[0031] In one embodiment, Class IDs are 12-bit in length and may range from 0 to 4095. Class ID “0” may be used as a Default Class ID. In one embodiment, a maximum number of interface classes is specified, for instance, by the interface class maximum command 212 of FIG. 2. When a maximum number of interface classes is specified, the Class IDs will range from 0 to the maximum specified value. In that embodiment, the values outside of the Class ID range (from the maximum Class ID value plus one to 4095) can be used as Interface IDs. The Interface IDs are generally used to identify L3 interfaces that require hardware support but do not belong to any specific interface classes.

[0032] With reference again to FIG. 2, every interface that belongs to the Interface Class 52 inherits all the attributes, including the packet forwarding rules, of the Interface Class. An interface belongs to an Interface Class when it is explicitly configured to belong to that Interface Class. An example of an interface configuration command that explicitly associates an interface with a configured Interface Class is the command 204. As shown, the interface configuration command 204 configures a physical interface (2/1/0) with the Class ID 52, an IP address of 165.122.128.12, and a subnet mask of 255.255.0.0 to create an L3 interface that belongs to the Interface Class 52. The L3 interface thus created would inherit all the attributes of the Interface Class 52, including the packet forwarding rules that are applicable to the Interface Class.

[0033] Multiple interfaces can belong to an Interface Class. For instance, the interface configuration command 206 configures another physical interface (1/0/1) with the Class ID 52, an IP address of 192.16.5.29, and a subnet mask of 255.255.255.0 to create an L3 interface that, like the L3 interface above, belongs to the Interface Class 52. This L3 interface will also inherit all the attributes of the Interface Class 52, including the packet forwarding rules that are applicable to the Interface Class. A result is the aggregation of the use of a 12-bit identifier to refer to multiple interfaces.

[0034] In one embodiment, an interface that is not explicitly configured to belong to an Interface Class is implicitly configured to belong to a Default Interface Class, which has a Class ID of “0.” When an interface is implicitly configured to belong to a Default Interface Class, the network node will generate an Interface ID and assign the Interface ID to the interface. In one embodiment, the generated Interface ID will have a value greater than the maximum Class ID but smaller than 4096 such that it can be stored in the hardware lookup table of FIG. 3. For example, interface configuration command 210 configures a physical interface (2/1/3) with the IP address of 192.15.4.22, and the subnet mask 255.255.0.0 to create yet another L3 interface. The command 210 also specifies two packet forwarding rules for the L3 interface. This L3 interface thus created will be assigned an Interface ID (e.g., 3829), which will also be stored in a hardware lookup table such as the one shown in FIG. 3 in association with data representative of the specified packet forwarding rules.

[0035] Attention now turns to the relationship between VLAN IDs and Class IDs and Interface IDs. By way of background, VLAN is an acronym for Virtual Local Area Network. A VLAN is an emulation of a standard LAN and can also be considered a broadcast domain set up within a switch. VLANs allow a group of devices to communicate as if they are attached to the same LAN segment even though the devices are actually located on different LAN segments. With VLANs, switch/routers can support more than one subnet on a physical link.

[0036] According to an embodiment of the invention, the network node 100 is configured to support the following types of L3 interfaces:

[0037] 1. L3 interfaces that are mapped to a VLAN, and

[0038] 2. L3 interfaces that are mapped to a single port.

[0039] In this embodiment, the network node treats the L3 interfaces that are mapped to a single port as if they are mapped to a VLAN with a single port. Thus, every L3 interface is assigned a VLAN ID, regardless of whether it maps to an actual VLAN. If an L3 interface is mapped to a VLAN, the L3 interface will be assigned a VLAN ID that is between 2 and 4094, inclusive. If an L3 interface is mapped to a single port, the L3 interface will be assigned a VLAN ID that is larger than 4095. Note that a VLAN ID that is larger than 4095 is consistent with the IEEE 802.1Q standard. A port that is not explicitly associated with a VLAN ID gets associated with a VLAN ID that is greater than 4095. This port cannot be configured to carry 802.1Q encapsulated traffic. Hence the VLAN ID is not of any significance. In other words, traffic entering or leaving such a port would not have the VLAN ID in the packet header.

[0040] Referring now to FIG. 4, there is shown a portion of a lookup table where VLAN IDs of the L3 Interfaces can be used as keys to look up the corresponding Class IDs and Interface IDs. The lookup table of FIG. 4 is sometimes referred to as an L2 lookup table. In one embodiment, the Class IDs/Interface IDs of this lookup table are programmed by the interface configuration commands such as those shown in FIG. 2. L3 interfaces have Class IDs if they belong to an Interface Class. L3 interfaces that do not belong to any Interface Class have unique Interface IDs. If an L3 interface that does not need hardware support for packets sent or received, the interface will have an Interface ID of “0.” Examples of L3 interfaces that typically do not need hardware support for packets sent or received include L3 interfaces that are mapped to MPLS tunnels, PIM Register Tunnels, or GRE Tunnels.

[0041] Note that, as shown in FIG. 4, the same Class ID may be shared by multiple L3 interfaces belonging to the same Interface Class. The use of Interface Classes enables the same set of packet forwarding rules to be associated with different interfaces while consuming only a single interface ID value from the limited ID space. As a result, even if the number of Class IDs and Interface IDs is limited, the network node can support a significantly larger number of logical interfaces.

[0042] Associating the same interface class with multiple interfaces has an aggregation effect that expands the number of interfaces that can be accommodated in a cascaded lookup. FIG. 6A depicts the limitation on the number of interfaces that a network node can accommodate without using Interface Classes. In FIG. 6A, lookup table 602 stores VLAN IDs and Interface IDs, and lookup table 604 stores Interface IDs and the associated packet forwarding rules. VLAN A is associated with an Interface ID of 47, which maps to an entry of lookup table 604 that contains the rules R1 and R2. VLAN B is associated with an Interface ID of 106, which maps to an entry of the lookup table 604 that also contains the rules R1 and R2. VLAN C is associated with an Interface ID of 3829, which maps to an entry of the lookup table 604 that also contains the same rules R1 and R2. In this example, there is no aggregation effect, and the number of interfaces that can be accommodated is limited by the number of entries of the table 604.

[0043]FIG. 6B depicts how the number of interfaces that a network node can accommodate is expanded when Interface Classes are used. In FIG. 6B, lookup table 612 stores VLAN IDs and Class IDs and Interface IDs; and, lookup table 614 that stores Class IDs and Interface IDs and their associated packet forward rules. In FIG. 6B, VLAN X, Y and Z are associated with a Class ID of 52, which maps to a single entry of the lookup table 614 that contains data representative of the packet forwarding rules R1 and R2. In this example, the use of Interface Classes allows a much larger range for the table 612 without expanding the size of table 614.

[0044]FIG. 5 is a flow diagram for an L3 switching process in accordance with an embodiment of the invention. The L3 switching process shown can be performed by a packet forwarding mechanism, such as specialized hardware on the line cards 102 a-102 c and/or processors 118.

[0045] As shown, at step 502, a packet is received through an L3 interface. At step 504, the network node uses the VLAN ID associated with the physical interface to obtain a Class ID or an Interface ID of the L3 interface. As discussed above, if the L3 interface belongs to a configured Interface Class, a Class ID can be obtained by looking up a table such as the one shown in FIG. 4. If the L3 interface does not belong to a configured Interface Class, an Interface ID can be obtained by looking up the same table.

[0046] At step 506, the network node uses the obtained Class ID or Interface ID to retrieve applicable packet forwarding rules. In one embodiment, step 506 can be performed by looking up a hardware lookup table, such as the one shown in FIG. 3.

[0047] At step 508, the network node applies the retrieved rules to the packet.

[0048] Preferred embodiments and best mode of the invention have thus been disclosed. Although specific embodiments of the invention have been described and illustrated, the invention is not to be limited to the specific forms or arrangements of parts as described and illustrated herein. The invention is limited only by the claims. 

What is claimed is:
 1. A network node having a plurality of communication ports, the network node comprising: an interface configuration mechanism operable to receive user commands, the user commands comprising: an interface class configuration command that configures at least in part an interface class in terms of an interface class identifier and one or more packet forwarding rules; an interface configuration command that configures at least in part a first interface for a specified one of the plurality of communication ports and non-exclusively assigns the interface class identifier to the first interface; and a packet forwarding mechanism operable to apply the one or more packet forwarding rules, which are associated with the interface class identifier, to packets arriving at the first interface.
 2. The network node of claim 1, wherein the user commands further comprise a second interface configuration command that configures at least in part a second interface for a specified one of the plurality of communication ports in terms of at least the interface class identifier.
 3. The network node of claim 2, wherein the packet forwarding mechanism is operable to apply the one or more packet forwarding rules to packets arriving at the first interface and packets arriving at the second interface.
 4. The network node of claim 1, further comprising a first lookup table having a plurality of entries, each entry corresponding to an interface class configuration command and operable to store an interface class identifier in association with data representative of one or more packet forwarding rules.
 5. The network node of claim 4, further comprising a second lookup table having a plurality of entries, each entry corresponding to an interface configuration command and operable to store an interface class identifier in association with at least a VLAN ID.
 6. The network node of claim 1, wherein the interface configuration mechanism comprises a Command Line Interface (CLI).
 7. The network node of claim 1, wherein the user commands further comprise a third interface configuration command that configures at least in part a third interface for a third specified one of the communication ports in terms of at least one or more packet forwarding rules.
 8. The network node of claim 7, wherein the interface configuration mechanism generates an interface identifier for the third interface when the interface configuration command does not specify an interface class identifier.
 9. A method for managing a network node, comprising: identifying an interface class; associating one or more packet forwarding rules with the interface class; establishing at least two interfaces in terms of at least the interface class.
 10. The method of claim 9, wherein the identifying step comprises assigning a class identifier to the interface class.
 11. The method of claim 10, wherein the identifying step comprises limiting a maximum number of class identifiers to a predetermined value.
 12. The method of claim 9, wherein the one or more packet forwarding rules comprise a rule for establishing an access control list (ACL).
 13. The method of claim 9, wherein the one or more packet forwarding rules comprise a rule for establishing Quality of Service (QoS) guarantees.
 14. The method of claim 9, wherein the one or more packet forwarding rules comprise a rule for establishing policy routing.
 15. The method of claim 10, wherein the establishing step comprises providing the class identifier, an IP address, and a subnet mask for a selected physical port of the network node to define a first Layer 3 Interface.
 16. The method of claim 15, wherein the establishing step comprises providing the class identifier, an IP address, and a subnet mask for a selected physical port of the network node to define a second Layer 3 Interface.
 17. The method of claim 9, further comprising: receiving a first packet via a first one of the at least two interfaces; and applying the one or more packet forwarding rules, which are associated with the interface class, to the first packet.
 18. The method of claim 17, further comprising: receiving a second packet via a second one of the at least two interfaces; and applying the one or more packet forwarding rules, which are associated with the interface class, to the second packet.
 19. The method of claim 9, wherein the identifying step comprises assigning a class identifier to the interface class and further comprising: receiving a first packet via a first one of the at least two interfaces; performing a hardware lookup using the class identifier as a key to identify the one or more packet forwarding rules; applying the one or more packet forwarding rules, which are identified through the hardware lookup, to the first packet; receiving a second packet via a second one of the at least two interfaces; performing a hardware lookup using the class identifier as a key to identify the one or more packet forwarding rules; applying the one or more packet forwarding rules, which are identified through the hardware lookup, to the second packet. 